local ads__taiji = fk.CreateSkill {
  name = "ads__taiji",
}

Fk:loadTranslationTable{
  ["ads__taiji"] = "太极",
  [":ads__taiji"] = "一名其他角色使用非杀牌后，你可进行判定，若判定结果为红色，则此牌无效。",

  ["$ads__taiji1"] = "阴阳调和，刚柔并济。",
  ["$ads__taiji2"] = "太极生两仪，化劲于无形。",
}

ads__taiji:addEffect(fk.CardUsing, {
  anim_type = "control",
  can_trigger = function(self, event, target, player, data)
    return target ~= player and player:hasSkill(ads__taiji.name) and not player:isFakeSkill(self) and
      data.card and data.card.trueName ~= "slash" and not data.card:isVirtual()
  end,
  on_cost = function(self, event, target, player, data)
    return player.room:askToSkillInvoke(player, {
      skill_name = ads__taiji.name,
    })
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local judgeData = {
      who = player,
      reason = ads__taiji.name,
      pattern = ".|.|heart,diamond",
    }
    room:judge(judgeData)
    
    if judgeData:matchPattern() then
      room:broadcastPlaySound("./audio/system/cancel")
      room:doAnimate("cancel", {
        from = player.id,
        to = target.id,
      })
      data.nullifiedTargets = table.simpleClone(room.players)
      return true
    end
  end,
})

ads__taiji:addAI({
  think_skill_invoke = Util.TrueFunc,
})



return ads__taiji
